package com.example.csdn.anno;

import com.example.csdn.validation.StateValidation;
import com.example.csdn.validation.StatusValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = {StatusValidation.class})
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Status {

    String message() default "Status参数的值只能是启用或者禁用";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
